package net.wanho.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Author：汤小洋
 * Date：2023-08-21 15:00
 * Description：<描述>
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    private Integer id;
    private String username;
    private String password;

    public static int compare(User o1, User o2) {
        return o2.getId() - o1.getId();
    }

    public int compare2(User o1, User o2) {
        return o2.getId() - o1.getId();
    }

    public int compare3(User o) {
        return this.getId() - o.getId();
    }
}
